#include "Statement.h"

Statement::Statement(){

}

Statement::~Statement(){

}

Statement::Statement( Term subj, Term pred,  Term obj, Term cont ){
	subject=subj;
	predicate = pred;
	object = obj;
	context = cont;
}

Statement::Statement(const Statement& other ){
	subject=other.subject;
	predicate=other.predicate;
	object= other.object;
	context = other.context;
}

Statement& Statement::operator=(const Statement& other ){
	subject=other.subject;
	predicate = other.predicate;
	object = other.object;
	context = other.context;
	return *this;
}

std::string Statement::toString(){
	std::string info;
	info += "The subject is: " + subject.toString() +" \n";
	info += "The predicate is: " + predicate.toString() + "\n";
	info += "The object is: " + object.toString() + "\n";
	return info;
}


void Statement::setSubject( Term subj ){
	subject = subj;
}

void Statement::setPredicate( Term pred){
	predicate = pred;
}

void Statement::setObject(Term obj){
	object = obj;
}

Term Statement::getSubject(){
	return subject;
}

Term Statement::getPredicate(){
	return predicate;
}

Term Statement::getObject(){
	return object;
}

void Statement::setSubject( std::string subj ){
	subject.setName(subj);
	subject.setType(RDFS_ATOM);
}

void Statement::setPredicate( std::string pred){
	predicate.setName(pred);
	predicate.setType(RDFS_ATOM);
}

void Statement::setObject(std::string obj){
	object.setName(obj);
	object.setType(RDFS_ATOM);
}
